#输入一个初始余额和密码
money = 10000
key2 = 'abcd'

while True :
	#输出存取款机界面
	print ("="*12,"自动存取款机","="*14)
	print ("{0:1} {1:13} {2:15}".format(" ","1, 账户登陆","2, 查询余额"))
	print ("{0:1} {1:15} {2:15}".format(" ","3, 取钱","4,存钱"))
	print ("{0:1} {1:13}".format(" ","5, 系统退出"))
	print ("="*40)
	key = input("请输入对应的选择： ")
	# 根据输入的值，执行对应的操作
	if key == "1":#根据密码登陆
		print("="*12,"账户登陆界面","="*14)
		name = input("请输入您的姓名： ")
		key1 = input("请输入您的密码： ")
		if key1 == key2 :
			print ("hello!",name)
		else :
			print ("="*12,"密码有误","="*14)
		input("按回车键继续： ")
	elif key == "2":#查询目前的余额
		print("="*12,"查询余额界面","="*14)
		print("您所剩余额： ",money)
		input("按回车键继续： ")
	elif key == "3":#取钱操作，展示余额
		print("="*12,"取钱界面","="*18)
		a = int(input("请输入您要取的金额："))
		if a >money:
			print("所取金额超过余额")
		else: 
			money = money - a
			print("取款成功，所剩余额：",money)
		input("按回车键继续： ")
	elif key == "4":#存钱操作，展示余额
		print("="*12,"存钱界面","="*18)
		b = int(input("请输入您要存的金额："))
		money = money + b 
		print("存款成功，所剩余额：",money)
		input("按回车键继续： ")
	elif key == "5":#推出系统
		print("="*12,"再见！","="*20)
		break
	else :
		print("="*12,"输入有误","="*18)